import request from "@/utils/request-gis";

// ---------------------------------------------------设备分类-------------------------------------------------
class DeviceCategoryApi {
  // 新增
  static api_add(data: any) {
    return request({
      url: "/api/GisDeviceCategory/AddAsync",
      method: "post",
      data,
    });
  }

  // 删除
  static api_del(data: any) {
    return request({
      url: "/api/GisDeviceCategory/DeleteAsync",
      method: "post",
      data,
    });
  }

  // 更新
  static api_update(data: any) {
    return request({
      url: "/api/GisDeviceCategory/UpdateAsync",
      method: "post",
      data,
    });
  }

  // 查询
  static api_query(data: any) {
    return request({
      url: "/api/GisDeviceCategory/QueryAsync",
      method: "post",
      data,
    });
  }

  // 查询 管点
  static api_query_point(data: any) {
    return request({
      url: "/api/GisDeviceCategory/QueryGisPointGroupInfoAsync",
      method: "post",
      data,
    });
  }

  // 查询 管点
  static api_query_point_(data: any) {
    return request({
      url: "/api/GisDeviceCategory/QueryGisPointGroupInfoBySBTZAsync",
      method: "post",
      data,
    });
  }

  // 查询 管线
  static api_query_line(data: any) {
    return request({
      url: "/api/GisDeviceCategory/QueryGisLineGroupInfoAsync",
      method: "post",
      data,
    });
  }

  // 详情
  static api_detail(id: number) {
    return request({
      url: "/api/GisDeviceCategory/DetailsAsync?Id=" + id,
      method: "post",
    });
  }

  // 详情
  static api_update_show_module(data: any) {
    return request({
      url: "/api/GisDeviceCategory/UpdateShowModuleAsync",
      method: "post",
      data,
    });
  }

  // 关注
  static api_attention_add(data: any) {
    return request({
      url: "/api/GisAttention/AddAsync",
      method: "post",
      data,
    });
  }

  // 关注 删除
  static api_attention_del(data: any) {
    return request({
      url: "/api/GisAttention/DeleteAsync",
      method: "post",
      data,
    });
  }

  // 批量更新
  static api_batch_update_async(data: any) {
    return request({
      url: "/api/GisDeviceCategory/BatchUpdateAsync",
      method: "post",
      data,
    });
  }

  // 当前设备类型属性是否可以修改
  static api_query_attr_is_edit(data: any) {
    return request({
      url: "/api/GisDeviceCategory/GetGisDeviceCategoryAttrStaAsync",
      method: "post",
      data,
    });
  }
}
export default DeviceCategoryApi;
